New Stuff

KNN Classification of Nebulous Subgenres


I used my (very limited) corpus to train a KNN classifier. I used basically every numerical feature Spotify calculated, as I have not been able to find any that clearly distinguish the songs in my Metal playlist from those in my Rock playlist. I set k=10, as there are 100 songs in my playlist, and 10 is the square root of 100. I have tried other values for k but none outperform k=10.
As visible in the confusion matrix this algorithm performs fairly well, but it is most definitely biased as the dataset is quite small, to (hopefully) improve it I performed some feature analysis to see what features correlate the most with genre.

Feature Analysis for Classification


The popularity of a track, the valence and the duration of the track seem to be the features that correlate with genre the most, followed by danceability, energy, acousticness and instrumentalness. Making a KNN with only the top 3 features and a KNN with the top 7 seems to be a viable strategy.

Final KNN


After some tweaking this KNN algorithm had the best results, this is the one I’ll be using in the following experiment. I’ll be looking at three genres which are not featured in my main playlist, and see how “Metal” they are according to this classifier. For this experiment I created three new playlists, a Glam Metal playlist, a Grunge playlist and finally a Nu Metal playlist. As the names suggest two of these genres are subgenres of Metal, however Grunge is a genre in which some artists take heavy influence from Metal. Glam Metal, or Hair Metal as it’s sometimes called for the musicians’ subtle usage of hairspray, was a popular genre in the ’80s. Because of its popularity, the lyrical themes and the overall sound of the music this genre is closer to Hard Rock than to Metal in my opinion. Because I don’t listen to this genre at all I predict these songs won’t have much of an overlap with the Metal part of my playlist, but because of the small number of features my classifier works with I can’t be sure what it will predict.
Although it I would consider it a subgenre of Alternative Rock, I’d describe Grunge as a mix between Punk Rock and Metal. The Grunge playlist I created consists of five songs that are closer to Metal and five that are closer to Rock, in my opinion at least.
I chose Nu Metal as the final genre as it is not considered “real Metal” by the type of Metal fan that would curate an online music forum. This Alternative Metal subgenre blends elements of various Metal subgenres, Hip-Hop and numerous other genres including Grunge. Considering the songs in this playlist I think most of them should be considered Metal, but I’m not sure if my KNN classifier will agree.

Using the KNN for Classification


My predictions were far off. More songs in the Glam Metal playlist were classed as Metal than I originally thought, so the genre isn’t misnamed after all.
The Grunge playlist was classed as being half Metal, which I hoped for when I picked the songs, however two of the five songs that the KNN calls Metal were from the slower part of the playlist. Especially “Alive” by Pearl Jam had a surprising outcome, as that might be the softest song out of that playlist.
The Nu-Metal only had three Metal songs in it apparently, but this might be because there are no Nu-Metal songs in my original corpus. Slipknot’s “The Heretic Anthem” being classed as Rock was a surprise for me here, especially because the other Slipknot song is considered Metal.
If I had more songs in my original corpus, and more features with a high correlation with genre these predictions would be a lot more accurate, however this experiment has provided me some important insights into my corpus.

Corpus

Introducing My Taste in Music

For this project I have chosen 10 bands, 5 of which are not considered Rock but not Metal bands and 5 of which are considered Metal bands. Metal is a subgenre of Rock that has a multitude of subgenres of itself. Metal is defined as: “a type of Rock music with a very strong beat played very loud on electric guitars”. Which is a bit of a vague definition in my opinion. When does a song have a strong enough beat or when is it played loud enough to be considered metal? My goal is to see how easily distinguishable these genres actually are if we looked at different features of songs in both playlists.

Band selection

The Rock bands I picked are: Queens of the Stone Age, Radiohead, Queen, Led Zeppelin and Arctic Monkeys.
The Metal bands I picked are: Metallica, Death, Gojira, Opeth and TOOL.
For both groups I tried to pick bands that sound as distinct as possible from eachother, however this list is definitely too limited to provide a complete overview of both genres. The non-Metal bands I chose are varied enough but still don’t provide an overview of the genre in its entirety and 3 of the 5 metal bands I chose fall into different categories of the Death Metal subgenre.

Song selection

For the rock songs I mainly focused on somewhat high tempo guitar based music, to make the distinction between Metal and Rock as hard as possible. Some Queen and Radiohead songs are obvious exceptions to this, however I feel these are still interesting to analyse as they often have shifting dynamics, or they can provide a baseline to define a non-Metal Rock song. Queens of the Stone Age is the non-Metal band that comes closest to being a Metal band, but I decided not to include their actual Metal songs. Led Zeppelin is often credited for at least partially inspiring the Metal genre.
For the Metal playlist I picked songs that are unmistakably Metal. Metallica is an obvious inclusion, however I only added songs from their early Thrash Metal days. Death and Gojira fit the bill as well.

Outliers

Queens of the Stone Age - ‘My God is the Sun’; Heavy non-Metal song.
Radiohead - ‘Paranoid Android’; Alternates between soft Rock parts and chaotic loud solos.
Led Zeppelin - ‘Immigrant Song’; Considered “Proto-Metal”, influential on the genre.
Opeth - ‘The Leper Affinity’; Good example of Opeth’s dynamics.
TOOL - ‘Bottom’ and ‘Ticks & Leeches’; Both songs have very quiet build-up parts in the middle.

Is Metal that Much Angrier?


By looking at this plot it’s obvious that the songs in the Metal part of the playlist are a lot more clustered toward high energy and low valence. The Rock songs seem to be a lot more scattered, which could be explained by the variety of Rock subgenres in that part of the playlist. The purple lines represent the means of both variables in both playlists and show a that Metal tends to have a lower valence and a higher energy. So yes, Metal is angrier (on average at least).
I will be exploring this topic under this tab.

Tempo and Popularity


Contrary to the definition of the genre, the mean tempo of the Metal playlist is actually slightly lower than the mean tempo of the Rock playlist. This could be because Metal tracks feature more tempo changes and have are often structured differently than (popular) Rock tracks. This is a topic I will explore more in the structures tab. However as it only differs 3 bpm, it’s not a significant difference.
As I expected, the songs on my metal playlist are slightly less popular than the songs in my Rock playlist. This could be due to track and mostly band selection, as there’s no clear indication that tempo has anything to do with it. Interestingly though, the least popular Metal track is still more popular than the least popular Rock tracks.

SD and mean tempo


Metal tracks tend to have more varying tempos than rock tracks. (WIP)

Emotions

Introducting Keys


The key a song is written in plays a major role in the emotional perception of a track. Minor keys are often deemed sadder or less energetic, while major keys are often described as happier or more energetic. As seen on this tab, these descriptions aren’t always accurate.
For every existent key, there is at least one song in the Rock playlist that uses it, this is not the case for the Metal playlist however. The popularity of Em among Metal tracks is unsurprising, as the key represents grief, mournfulness and restlessness of spirit. For the Rock playlist there is not really a key that stands out as much.

Back to Keys (1/3)


As this song is in the key of Am, the keygram seems to be rather accurate. As this song is quite long and has an interesting structure I’d expected the keygran to do worse.

Back to Keys (2/3)


This song is in the key of Em, which is also pretty obvious from the keygram. Before and a bit after the 300s mark the keygram seems to do a little worse, but overall it gets it right.

Back to Keys (3/3)


Unlike the previous two examples, it doesn’t work for this song at all. It’s supposed to be in Em, however from the keygram that is impossible to tell.

Songs with Low Valence (1/3)


This song has the lowest valence of not only the Metal part of the corpus, but of the corpus in its entirety. It also happens to have the highest energy of the entire corpus. The chromagram makes that pretty clear, by being almost entirely incomprehensible. The only pitch class which seems to be prevalent is the F. The parts at around 140 seconds and at 200 seconds stand out, as there are no real pitch classes that seem to be prevalent at all. In these parts the singing and the instrumental change a bit from the rest of the song, the singing making way for a low grunt and the palm muted guitars allow the drums to rise to the center of attention, muddling the chromagram.

Songs with Low Valence (2/3)


“Creep” by Radiohead scores lowest on valence in the Rock half of the corpus and the song scores a lot lower on energy than “To Sirius” on the previous page. Here the chord progression is a lot easier to read, as the G, B and C are the pitch classes with the highest magnitude.

Songs with Low Valence (3/3)


(I’m not sure if I’m keeping this as a separate page or if I’m swapping this with the chromagram for Creep, as this is basically the same information.)
As “Creep” has an interesting but simple chord progression, it’s chordogram is clear. The four chords constantly looping are G, B, C and Cm and those are the only four chords in the song.

Structures

Histogram of Tempi


In this histogram it’s quite clear that the songs in the Metal playlist overall tend to be a bit slower than the songs in the Rock playlist. This could might be because the songs in the Metal playlist tend to have more shifting tempos, as seen in one of my earlier visualizations on the Corpus tab.

Songs with Weird Structures (1/2)


The song “Deliverance” by Opeth is part of the Progressive Death Metal subgenre, which explains its peculiar structure. As visible in the cepstrogram the timbre changes at around a minute and 10 seconds in, when the vocalist starts singing instead of his usual low growling and more importantly the guitar tone changes from heavily distorted to clean. At roughly 5 minutes into the song, the clean singing starts again, however this part does feature a distorted guitar, so this is not visible in the cepstrogram. The self-similarity matrices highlight the same clean part as an outlier, and both show a highlight at around 10 minutes in at the introduction of the outro riff.

Tempogram Deliverance


In the tempogram of the song the highlights seen in its SSM aren’t visible, so the tempo remains the same but it’s just the instrumental that changes. This is quite interesting as I find the clean passage near the start of the song to be slower than the intro. The part where all music suddenly drops out at the beginning of this clean part is visible in the tempogram however. There are some highlights at around 160 bpm throughout the song, but those are probably just a product of tempo octaves.

Songs with Weird Structures (2/2)


Another song in my corpus with an interesting structure is “Paranoid Android” by Radiohead. However where “Deliverance” has a clear standout moment, this song consists of three audibly different parts: the intro, the aggressive part and the “rain down” part (from around 3:35 to around 6:10). These different parts aren’t clearly visible in the chroma based SSM unfortunately, as it shows so many significant changes it becomes a bit messy. These changes are visible in the cepstrogram and the timbre based SSM, however. This may have something to do with the fact the the song stays in the same key, but the instrumentation varies from an acoustic guitar in the intro and the “rain down” part to distorted guitars in the aggressive parts.

Tempogram Paranoid Android


The changes from the softer to the aggressive parts are quite clear from the tempogram, even moreso than from the SSMs. However the tempogram does not seem to be sure as to what the tempo of the ending is. I had expected it to fall back down to around 80 bpm, so the same as the start of the song. Again there’s some visual noise, however it doesn’t appear to be at the tempo octaves.